Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(acpi): Fixed how kepler searches for ACPI in hwmon #1375

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vimalk78
Copy link
Collaborator

ACPI power meter in hwmon need not always be present in "/sys/class/hwmon/hwmon2"

This commit fixes this problem by

  • looking inside each folder in "/sys/class/hwmon"
  • improving the method to detect presece of acpi power meter. (this method is inspired from lm-sensors project)

   ACPI power meter in hwmon need not always be present in
   "/sys/class/hwmon/hwmon2"

   This commit fixes this problem by
   - looking inside each folder in "/sys/class/hwmon"
   - improving the method to detect presece of acpi power meter. (this
     method is inspired from lm-sensors project)

Signed-off-by: Vimal Kumar <[email protected]>
@vimalk78
Copy link
Collaborator Author

Cc: @rootfs @marceloamaral

var powerPath string
err := filepath.WalkDir(acpiPowerPath, func(path string, info fs.DirEntry, err error) error {
/*
detecthwmonACPIPath looks for an entry in /sys/class/hwmon which has an attribute
Copy link
Contributor

@rootfs rootfs Apr 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a doc source and sample path too?

@sthaha
Copy link
Collaborator

sthaha commented Jul 16, 2024

@vimalk78 thoughts on closing this PR?

@vimalk78
Copy link
Collaborator Author

@vimalk78 thoughts on closing this PR?

if community thinks this is not needed, i can close it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants